<?php
namespace common\models;

use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;

/**
 * 提币地址数据模型
 * @author CGA
 */
class ARAddressout extends ActiveRecord
{
    const DEFAULT_IS = 1;
    const DEFAULT_NOT = -1;

    const SECURITY_SAFE = 1; //数据安全
    const SECURITY_UNSAFE = 0; //数据不安全

    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%account_out}}';
    }

    /**
     * @inheritdoc
     */
    public function behaviors()
    {
        return [
            TimestampBehavior::className(),
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'uid'         => '用户编号',
            'address'     => '提币地址',
            'coin'        => '币种',
            'name'        => '地址标签',
            'is_default'  => '是否默认',
            'security_at' => '安全时间',
        ];
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uid', 'address', 'coin', 'name', 'is_default', 'security_at'], 'safe'],
        ];
    }
}
